[Repo Assist] fix: filter compiler-generated types from Info Panel declared types list#2157
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
Compiler-generated .NET types such as async state machines (<MethodName>d__0), display classes (<>c__DisplayClass), and F# closure types (MatchClosure@123) were appearing in the Info Panel's 'Declared Types' section when navigating types from assemblies that use async/iterator methods or LINQ. These types are identifiable by their names: compiler-generated names either start with '<' (C#/.NET convention) or contain '@' (F# compiler convention). User-defined generic types like MyType<'T> are not affected because their names do not start with '<'. Closes #1696 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
39 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Closes #1696
Problem
The Info Panel's Declared Types section was showing compiler-generated implementation detail types when navigating assemblies that use async, iterator methods, or LINQ — for example Dapper's
SqlMappershowed types like<>c__DisplayClass3_0and(MoveNextAsync)d__1.These types are generated by the .NET and F# compilers, are not part of the public API, and are never useful to a user browsing documentation in the Info Panel.
Fix
Added a client-side filter in
src/Components/InfoPanel.fsto exclude types whose names are identified as compiler-generated:<→ C#/.NET compiler convention: async state machines ((MethodName)d__0), display classes (<>c__DisplayClass), anonymous types (<>f__AnonymousType0), etc.@→ F# compiler convention: closure types (MatchClosure@123), computed expression types, etc.User-defined generic types like
MyType<'T>are not affected — their names don't start with<.Alternatives considered
The upstream approach (filtering in FsAutoComplete using
FSharpEntity.IsCompilerGenerated) would be more precise, but requires a coordinated FSAC release. The client-side filter is robust for all known naming conventions and an appropriate short-term fix.Test Status
✅
dotnet fable src --noCache— builds successfully, no new errors (pre-existing warnings only, unrelated to this change).No automated tests exist for the Info Panel's rendering logic; verified the change is a pure additive list filter.